/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package give.replay.config;

import java.util.Date;

/**
 *
 * @author koller
 */
public enum ColumnType {
    INT("int", Integer.class, Integer.class),
    STRING("string", String.class, String.class),
    DATE_IN_MS("dateInMs", Date.class, String.class);


    private String typeName;
    public Class c;
    public Class swingDisplayClass;

    ColumnType(String tn, Class c, Class sdc) {
        this.typeName = tn;
        this.c = c;
        this.swingDisplayClass = sdc;
    }

    public static ColumnType lookup(String typename) {
        for( ColumnType type : ColumnType.values() ) {
            if( type.typeName.toLowerCase().equals(typename.toLowerCase()) ) {
                return type;
            }
        }

        return null;
    }
}
